﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CSDemo
{
    public partial class FormEmployee : Form
    {
        public FormEmployee()
        {
            InitializeComponent();
        }
        public static string SendID, SendFName, SendLName, SendImage = "";
        private void FormEmployee_Load(object sender, EventArgs e)
        {
            try
            {

                dataGridView1.DataSource = cmd.ExcecuteDatatable("Select * from Employee");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);

            }
               
             }

        private void button1_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow Data in dataGridView1.SelectedRows)
            {
                string id, Fname, Lname;
                id = Data.Cells[0].Value.ToString();
                Fname = Data.Cells[1].Value.ToString();
                Lname = Data.Cells[2].Value.ToString();
            

                SendID = id;
                SendFName = Fname;
                SendLName = Lname;
            
            }
            FormAddProduct frm = new FormAddProduct();
            frm.Show();
        }

           
            
        }
    }
 